/*
* Copyright (c) 2016 . All Rights Reserved.
*/
package com.cgmnx.admin.common.bean;

/**
 * @author: created  Date: 16/12/20 Time: 下午10:42
 * @version: 1.0
 */
public class UserContext {

    private static final ThreadLocal<CurrentUserInfo> userInfoLocal = new ThreadLocal();

    public UserContext() {
    }

    public static CurrentUserInfo getUserInfo() {
        return userInfoLocal.get();
    }

    public static void setUserInfo(CurrentUserInfo userInfo) {
        userInfoLocal.set(userInfo);
    }

    public static void release() {
        userInfoLocal.remove();
    }
}